function refreshDisplay(obj)

% This file is part of CISNE.
%
%     CISNE is free software: you can redistribute it and/or modify
%     it under the terms of the GNU General Public License as published by
%     the Free Software Foundation, either version 3 of the License, or
%     any later version.
%
%     CISNE is distributed in the hope that it will be useful,
%     but WITHOUT ANY WARRANTY; without even the implied warranty of
%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%     GNU General Public License for more details.
%
%     You should have received a copy of the GNU General Public License
%     along with CISNE.  If not, see <http://www.gnu.org/licenses/>.

% Copyright 2011. Jose Maria Garcia-Valdecasas Bernal

%update Axes
obj.refreshAxes();

%update Input grids
if ~isempty(obj.m_inputGrids)
itemList=fieldnames(obj.m_inputGrids);

for j=1:length(itemList)
    obj.drawIGrid(itemList{j});
end
end
%update Computational grids
if ~isempty(obj.m_compGrids)
itemList=fieldnames(obj.m_compGrids);

for j=1:length(itemList)
    name=itemList{j};
    if strfind(name,'cMain')
        set(obj.m_compGrids.(name).rect,'Color',...
            obj.m_cMainProp.MarkerEdgeColor);
        set(obj.m_compGrids.(name).points.P0,obj.m_cMainProp);
        set(obj.m_compGrids.(name).points.P1,obj.m_cMainProp);
        set(obj.m_compGrids.(name).points.P2,obj.m_cMainProp);
        set(obj.m_compGrids.(name).points.P3,obj.m_cMainProp);                
    else
        set(obj.m_compGrids.(name).rect,'Color',...
            obj.m_cNestProp.MarkerEdgeColor);
        set(obj.m_compGrids.(name).points.P0,obj.m_cNestProp);
        set(obj.m_compGrids.(name).points.P1,obj.m_cNestProp);
        set(obj.m_compGrids.(name).points.P2,obj.m_cNestProp);
        set(obj.m_compGrids.(name).points.P3,obj.m_cNestProp);
    end
end
end

%update control points
if ~isempty(obj.m_controlPoints)
itemList=fieldnames(obj.m_controlPoints);

for j=1:length(itemList)
    set(obj.m_controlPoints.(itemList{j}),obj.m_PointsProp);
end
end



